<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<f:loadBundle basename="MessageResources" var="messages" />

<ui:composition>
	<h:form id="materialTableForm">
		<p:dataTable id="materialTable" var="material"
			value="#{materialBean.allMaterials}" rowKey="#{material.id}"
			selection="#{materialBean.selectedMaterial}" paginator="false"
			rows="1000" selectionMode="single" lazy="true" editable="false">

			<f:facet name="header">
				<h:outputText value="Materials" style="float: left" />
			</f:facet>

			<p:column id="cropColumn" headerText="Crop">
				<h:outputText value="#{material.crop}" />
			</p:column>

			<p:column id="sampleIdColumn" headerText="Sample ID">
				<h:outputText value="#{material.sampleId}" />
			</p:column>

			<p:column id="pudColumn" headerText="PGRFA Under Development?">
				<h:outputText value="#{material.pud}" />
			</p:column>

			<p:column id="ancestryColumn" headerText="Ancestry">
				<h:outputText value="#{material.ancestry}" />
			</p:column>

		</p:dataTable>

		<p:blockUI block="materialTable" trigger="materialTable">
        		LOADING<br />
			<p:graphicImage value="resources/images/loading.gif" />
		</p:blockUI>
	</h:form>
</ui:composition>

</html>
